import { Body, Controller, Get, HttpCode, HttpStatus, Param, Post } from '@nestjs/common';
import { PageDto } from '../common/dto/page.dto';
import { Transaction } from 'typeorm';
import { User } from '../entities/User.entity';
import { MysqlDemoService } from './mysql-demo.service';
import { ApiResponse } from '@nestjs/swagger';
import { Logger } from '../common/logger/logger';

@Controller('mysql-demo')
export class MysqlDemoController {
  //依赖注入业务接口
  constructor(private readonly mysqlService: MysqlDemoService) {}
  @Get('list')
  @ApiResponse({"status": 200, "description": "所有进件订单",type: PageDto,})
  @HttpCode(HttpStatus.OK)
  async findAll(): Promise<PageDto<User>> {
    return await this.mysqlService.findAll();
  }


}
